﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="ListProjects.aspx.cs" Inherits="Admin_ListProjects" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <div class="container-fluid">
    <div class="row-fluid">
            <div class="span12">
                <h3 class="page-title">
                    Danh sach San Pham </h3>
                <ul class="breadcrumb">
                    <li><a href="#"><i class="icon-home"></i></a><span class="divider">&nbsp;</span></li><li>
                        <a href="#">Form Stuff</a><span class="divider">&nbsp;</span></li><li><a href="#">Form
                            Layouts</a><span class="divider-last">&nbsp;</span></li></ul>
            </div>
        </div>
        <!--Data Grid-->
        <div class="row-fluid  form-horizontal">
            <div class="widget">
                <div class="widget-title">
                    <h4>
                        <i class="icon-group"></i>Danh sách San Pham</h4>
                </div>
                <div class="widget-body form">
                <div class="control-group">
                       <label class="control-label">
                            Loại San Pham:</label>
                            <div class="controls">
                                   <asp:DropDownList runat="server" ID="ddlCat" AutoPostBack="true"
                                       onselectedindexchanged="ddlCat_SelectedIndexChanged"></asp:DropDownList>
                            <asp:RequiredFieldValidator   
                                ID="ReqiredFieldValidator1"  
                                runat="server"  
                                ControlToValidate="ddlCat"  
                                ErrorMessage="Select san pham!"  
                                >  
                             </asp:RequiredFieldValidator>       
                            </div>   
                   </div>
                <div class="control-group">
                    <asp:GridView runat="server" ID="grTour" Width="100%" AutoGenerateColumns="false" ShowHeader="false" AllowPaging="false" AllowSorting="false"
                    GridLines="Horizontal"  CssClass="table table-striped table-bordered dataTable table-hover table-advance"
                    EnableEventValidation="true" OnRowCommand="grTour_RowCommand" OnRowDeleting="PendingRecordsGridview_RowDeleting" >
                        <Columns>
                            <asp:TemplateField ItemStyle-CssClass="idRow"> 
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnFaculty" runat="server" 
                                        Text='<%# Eval("Id") %>' PostBackUrl='<%# string.Format("EditProject.aspx?id={0}", Eval("Id")) %>'  ></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ItemStyle-CssClass="imageRow" >
                                <ItemTemplate>
                                    <asp:Image ID="imageFaculty" ImageUrl='<%# "../" + Eval("IMAGE") %>' runat="server" CssClass="imageList"/>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField >
                                <ItemTemplate>
                                    <asp:Label ID="lblName" Text='<%#Eval("Name") %>' runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField  ItemStyle-CssClass="actionRow">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnDelete" CommandName="Delete"  Text="Delete" runat="server" CssClass="btn btn-danger popovers"  OnClientClick="return confirm('Bạn xác nhận sẽ xóa san pham này ?')"
                                                CommandArgument='<%# Eval("Id") %>'  />
                                    <asp:LinkButton ID="btnGa" Text="Gallery" runat="server" CssClass="btn btn-success popovers"  
                                                 PostBackUrl='<%# string.Format("Gallery.aspx?id={0}&type=HOTEL", Eval("Id")) %>'  ></asp:LinkButton>            
                                </ItemTemplate>
                            </asp:TemplateField>

                        </Columns>
                    </asp:GridView>
                    </div>
                </div>
            </div>
    </div>
</div>
</asp:Content>
